﻿package com.firewolf.iteratorAndComponent.combine;

import java.util.Iterator;
/**
 * 一个空的迭代器，hasNext方法永远返回false，不能继续遍历，相当于树的叶子
 * @author Administrator
 *
 */
@SuppressWarnings("rawtypes")
public class NullIterator implements Iterator {

	@Override
	public boolean hasNext() {
		return false;
	}

	@Override
	public Object next() {
		return null ;
	}
	@Override
	public void remove() {
		throw new UnsupportedOperationException();
	}
}
